<template>
  <div class="page_root" :key="queryUpdateFlag" data-page-name="水泥配料配置" data-page-identification="h_3454if9n47">
    <a-spin :spinning="pageLoading.loading" :tip="pageLoading.tip">
      <!-- begin vid_hhntdk4l0x 自定义模板_c674bphve0 -->
      <div class="inner-div">
        <a-tabs v-model:activeKey="state.innerMilpostRadio" @change="getData">
          <a-tab-pane key="批次" tab="批次" />
          <a-tab-pane key="优先级" tab="优先级" force-render />
          <a-tab-pane key="时间轴" tab="时间轴" />
          <a-tab-pane key="项目" tab="项目" />
          <a-tab-pane key="里程碑项目阶段周期" tab="里程碑项目阶段周期" />
          <a-tab-pane key="延期偏差颜色设置" tab="延期偏差颜色设置" />
        </a-tabs>
        <div style="overflow-y: auto" v-if="state.innerMilpostRadio === '批次'">
          <!--                        <a-col :span="10" :offset="7">-->
          <a-form :model="state.batchList" ref="batchForm">
            <div class="module-item" style="width: 40%" v-for="(item, index) in state.batchList" :key="index">
              <div class="form-content">
                <a-row gutter="24">
                  <a-col :span="12">
                    <a-form-item label="批次" :rules="[{ required: true, message: '请输入批次！', trigger: 'blur' }]" :name="[index, 'name']">
                      <a-input-number style="width: 100%" v-model:value="state.batchList[index].name" />
                    </a-form-item>
                  </a-col>
                  <a-col :span="12">
                    <a-form-item label="产品类型" :rules="[{ required: true, message: '请输入产品类型！', trigger: 'blur' }]" :name="[index, 'productType']">
                      <a-input style="width: 100%" v-model:value="state.batchList[index].productType" />
                    </a-form-item>
                  </a-col>
                </a-row>
              </div>

              <a class="del" @click="handlerDeleteFormItem1(index)">删除</a>
              <a class="add-btn" @click="handlerAddFormItem1(index, '下方')">下方插入</a>
            </div>
          </a-form>
          <!--                        </a-col>-->
          <a-space>
            <a-button type="primary" ghost @click="handlerAddFormItem1(index, '最后')"
              ><template #icon><plus-outlined /></template>新增</a-button
            >
            <a-button type="primary" @click="submit">保存</a-button>
          </a-space>
        </div>
        <div style="overflow-y: auto; height: calc(100vh - 300px)" v-if="state.innerMilpostRadio === '优先级'">
          <a-form :model="state.priorityList" ref="priorityForm">
            <div class="module-item" v-for="(item, index) in state.priorityList" :key="index">
              <div class="form-content">
                <a-form-item label="优先级" :rules="[{ required: true, message: '请输入优先级！', trigger: 'blur' }]" :name="[index, 'name']">
                  <a-input v-model:value="state.priorityList[index].name" />
                </a-form-item>
              </div>

              <a class="del" @click="handlerDeleteFormItem2(index)">删除</a>
              <a class="add-btn" @click="handlerAddFormItem2(index, '下方')">下方插入</a>
            </div>
          </a-form>
          <!--                        </a-col>-->
          <a-space>
            <a-button type="primary" ghost @click="handlerAddFormItem2(index, '最后')"
              ><template #icon><plus-outlined /></template>新增</a-button
            >
            <a-button type="primary" @click="submit">保存</a-button>
          </a-space>
        </div>
        <div style="overflow-y: auto; height: calc(100vh - 300px)" v-if="state.innerMilpostRadio === '时间轴'">
          <a-form :model="state.timeAxisList" ref="timeAxiosForm">
            <div class="module-item" v-for="(item, index) in state.timeAxisList" :key="index">
              <div class="form-content">
                <a-row>
                  <a-col :span="12">
                    <a-form-item label="标题" :rules="[{ required: true, message: '请输入标题！', trigger: 'blur' }]" :name="[index, 'name']">
                      <a-input style="width: 100%" v-model:value="state.timeAxisList[index].name" />
                    </a-form-item>
                  </a-col>
                  <a-col :span="12">
                    <a-form-item
                      label="对应时间"
                      :labelCol="{ span: 6 }"
                      :wrapperCol="{ span: 18 }"
                      :rules="[{ required: true, message: '请选择对应时间！', trigger: 'blur' }]"
                      :name="[index, 'date']"
                    >
                      <a-date-picker value-format="YYYY-MM-DD" style="width: 100%" v-model:value="state.timeAxisList[index].date" />
                    </a-form-item>
                  </a-col>
                </a-row>
              </div>

              <a class="del" @click="handlerDeleteFormItem3(index)">删除</a>
              <a class="add-btn" @click="handlerAddFormItem3(index, '下方')">下方插入</a>
            </div>
          </a-form>
          <!--                        </a-col>-->
          <a-space>
            <a-button type="primary" ghost @click="handlerAddFormItem3(index, '最后')"
              ><template #icon><plus-outlined /></template>新增</a-button
            >
            <a-button type="primary" @click="submit">保存</a-button>
          </a-space>
        </div>
        <div style="overflow-y: auto; height: calc(100vh - 300px)" v-if="state.innerMilpostRadio === '项目'">
          <div class="default-table">
            <a-table
              bordered
              rowKey="taskId"
              :columns="columns"
              :data-source="state.projectList"
              :pagination="false"
              :scroll="{ y: '600px' }"
              :row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)"
            >
              <template #bodyCell="{ column, record }">
                <template v-if="column.dataIndex === 'priorityId'">
                  <a-select style="width: 100%" v-model:value="record.priorityId" show-search :options="state.priorityIdList" @change="submitBatch(record)" />
                </template>
                <template v-if="column.dataIndex === 'batchId'">
                  <a-select allow-clear style="width: 100%" v-model:value="record.batchId" show-search :options="state.batchIdList" @change="submitBatch(record)" />
                </template>
              </template>
            </a-table>
          </div>
        </div>
        <div style="overflow-y: auto; height: calc(100vh - 350px)" v-if="state.innerMilpostRadio === '里程碑项目阶段周期'">
          <!--                        <a-col :span="10" :offset="7">-->
          <a-form :model="state.milepostList" ref="milepostRef">
            <div class="module-item" v-for="(item, index) in state.milepostList" :key="index">
              <div class="form-content">
                <a-row>
                  <a-col :span="8">
                    <a-form-item
                      :labelCol="{ span: 12 }"
                      :wrapperCol="{ span: 12 }"
                      label="里程碑项目阶段名称"
                      :rules="[
                                                {
                                                    required: true,
                                                    message: '请输入目里程碑项目阶段名称！',
                                                    trigger: 'blur'
                                                }
                                            ]"
                      :name="[index, 'stageName']"
                    >
                      <a-input v-model:value="state.milepostList[index].stageName" />
                    </a-form-item>
                  </a-col>
                  <a-col :span="8">
                    <a-form-item
                      :labelCol="{ span: 6 }"
                      :wrapperCol="{ span: 18 }"
                      label="时间周期"
                      :rules="[{ required: true, message: '请输入时间周期', trigger: 'blur' }]"
                      :name="[index, 'stagePeriod']"
                    >
                      <a-input-number style="width: 100%" min="0" v-model:value="state.milepostList[index].stagePeriod" />
                    </a-form-item>
                  </a-col>
                  <a-col :span="8">
                    <a-form-item
                      :labelCol="{ span: 6 }"
                      :wrapperCol="{ span: 18 }"
                      label="排序"
                      :rules="[
                                                { required: true, message: '请输入序号', trigger: 'blur' },
                                                {
                                                    pattern: new RegExp(/^(0(\.\d{1,2})?|[1-9]\d*(\.\d{1,2})?)$/),
                                                    message: '仅支持小数点后两位的正数',
                                                    trigger: 'blur'
                                                }
                                            ]"
                      :name="[index, 'stageNo']"
                    >
                      <a-input-number style="width: 100%" v-model:value="state.milepostList[index].stageNo" />
                    </a-form-item>
                  </a-col>
                </a-row>
              </div>

              <a class="del" @click="handlerDeleteMile(index)">删除</a>
              <a class="add-btn" @click="handlerAddMile(index, '下方')">下方插入</a>
            </div>
          </a-form>
          <!--                        </a-col>-->
          <a-space>
            <a-button type="primary" ghost @click="handlerAddMile(index, '最后')"
              ><template #icon><plus-outlined /></template>新增</a-button
            >
            <a-button type="primary" @click="submitMile">保存</a-button>
          </a-space>
        </div>
        <div style="overflow-y: auto; height: calc(100vh - 350px)" v-if="state.innerMilpostRadio === '延期偏差颜色设置'">
          <!--                        <a-col :span="10" :offset="7">-->
          <a-form :model="state.colorDataList" ref="colorRef">
            <div class="module-item" v-for="(item, index) in state.colorDataList" :key="index">
              <div class="form-content">
                <a-row>
                  <a-col :span="6">
                    <a-form-item
                      :labelCol="{ span: 6 }"
                      :wrapperCol="{ span: 18 }"
                      label="天数"
                      :rules="[
                                                {
                                                    required: true,
                                                    message: '请输入天数！',
                                                    trigger: 'blur'
                                                }
                                            ]"
                      :name="[index, 'startDay']"
                    >
                      <a-input-number style="width: 100%" v-model:value="state.colorDataList[index].startDay" />
                    </a-form-item>
                  </a-col>
                  <a-col :span="2">
                    <a-form-item label="">
                      <div style="text-align: center"> 至</div>
                    </a-form-item>
                  </a-col>
                  <a-col :span="6">
                    <a-form-item :labelCol="{ span: 6 }" :wrapperCol="{ span: 18 }" label="天数" :rules="[{ required: true, message: '请输天数', trigger: 'blur' }]" :name="[index, 'endDay']">
                      <a-input-number style="width: 100%" v-model:value="state.colorDataList[index].endDay" />
                    </a-form-item>
                  </a-col>
                  <a-col :span="8">
                    <a-form-item :labelCol="{ span: 6 }" :wrapperCol="{ span: 18 }" label="颜色" :rules="[{ required: true, message: '请选择颜色', trigger: 'blur' }]" :name="[index, 'displayColor']">
                      <a-select
                        show-search
                        v-model:value="state.colorDataList[index].displayColor"
                        :options="state.colorList"
                        allow-clear
                        placeholder="请选择"
                        @focus="getProjectList"
                        :field-names="{ label: 'label', value: 'value' }"
                        :filter-option="
                                                    (input, option) => {
                                                        return (
                                                            option.projectName
                                                                .toLowerCase()
                                                                .indexOf(input.toLowerCase()) >= 0
                                                        )
                                                    }
                                                "
                      />
                    </a-form-item>
                  </a-col>
                </a-row>
              </div>

              <a class="del" @click="handlerDeleteColor(index)">删除</a>
              <a class="add-btn" @click="handlerAddColor(index, '下方')">下方插入</a>
            </div>
          </a-form>
          <!--                        </a-col>-->
          <a-space>
            <a-button type="primary" ghost @click="handlerAddColor(index, '最后')"
              ><template #icon><plus-outlined /></template>新增</a-button
            >
            <a-button type="primary" @click="submitColor">保存</a-button>
          </a-space>
        </div>
      </div>
      <!-- end vid_hhntdk4l0x 自定义模板_c674bphve0 -->
    </a-spin>
  </div>
</template>
<script setup lang="tsx">
  import {
      h, ref, reactive, toRaw, markRaw, watch, computed,
      onBeforeMount, onMounted, onBeforeUnmount, onUnmounted, onActivated, onDeactivated
    } from "vue";
    import { useRoute, useRouter } from 'vue-router';
    const router = useRouter();
    const route = useRoute();
    import { get, post, put, del, request, requestWithHeaders } from '@/utils/http/Axios';
    import { cloneDeep, localGet, merge, getDifferenceArray, traversalTreeStructure, checkCaseCondition, renderStringInTemplate, handleBreadcrumbJump, throttle, permission, getComponentParamsValue } from '@/utils/index';
    import { isNullOrEmpty, isEmptyArr, isNullOrUnDef, isContained, isArray, isEmpty, isObject } from '@/utils/is';
    import dayjs from 'dayjs';
    import { getPagePcChartsDataSourceConvert } from '@/utils/chart';
    import { message, notification, Modal } from 'ant-design-vue'
    import { propertyFormatByNumber, propertyFormatByPercentage, propertyFormatByDate, parseSubFromDataList } from '@/utils/format';
    import colorTheme from '@/design/custom-theme.json';
    
    import UserTableRecords from '@/model/UserTableRecords';
    import { getAppBaseUrl } from '@/utils/index';
    import { sendToken } from "@/hooks/useIframeToken";
    import { useSystemStore } from "@/store/modules/system";
    const systemStore = useSystemStore();
    



      // 获取传入的流程ID和组件参数
      const props = defineProps({
            'processInstanceId': {
            type: [String,Number,Boolean],
            default: undefined,
        },
      'tabName': {
            type: [String],
            default: undefined,
        },
      })
      const immediateWatch = (source, callback) => {
        watch(source, callback, {deep: true,immediate: true })
      }



  /* -------------------------- 属性定义 -------------------------- */

      const setTimeOutList = [];
      const pageLoading = reactive({
        loading: false,
        tip: undefined
      });
      const authInfo = localGet('app-user-store');




      // 处理校验
      const setSubFormName =(parentInfo, name)=>{
        return [parentInfo.parents, parentInfo.cycleIndex, name];
      }


  /* ========================== 属性定义 ========================== */


  /* -------------------------- 元素数据引用 -------------------------- */


  /* ========================== 元素数据引用 ========================== */


  /* -------------------------- 页面数据 -------------------------- */


  /* ========================== 页面数据 ========================== */



  /* -------------------------- 响应 -------------------------- */

  /* ========================== 响应 ========================== */


  /* -------------------------- 函数 -------------------------- */

  /* ========================== 函数 ========================== */


  /* -------------------------- 页面参数 -------------------------- */

    const pageParameter_state = reactive({
        'processInstanceId': props.processInstanceId ?? route.query.processInstanceId,
    })

  /* ========================== 页面参数 ========================== */


  /* -------------------------- 组件事件处理方法 -------------------------- */

    // ---------------------------- 组件数据同步 ----------------------------

    // ============================ 组件数据同步 ============================


  /* ========================== 组件事件处理方法 ========================== */


  /* -------------------------- 生命周期 -------------------------- */
  // 用于参数变更后重新执行自定义指令
      const queryUpdateFlag = ref(0);
      onMounted(() => { ;

    });

    onUnmounted(() => {
      // 销毁定时器
      setTimeOutList.forEach(({ repeat, timer }) => {
        repeat ?  clearInterval(timer): clearTimeout(timer);
      });
    });

  /* ========================== 生命周期 ========================== */


  /* -------------------------- 数据关联处理 -------------------------- */





  /* -------------------------- 表单数据同步 -------------------------- */
  /* ========================== 表单数据同步 ========================== */

  /* ========================== 数据关联处理 ========================== */


  /* -------------------------- 不同组件自定义的处理逻辑 -------------------------- */

  /* ========================== 不同组件自定义的处理逻辑 ========================== */


  // ================================定制化逻辑========================================
   const state = reactive({
          innerMilpostRadio: '批次',
          batchList: [],
          priorityList: [],
          timeAxisList: [],
          projectList: [],
          priorityIdList: [],
          colorList: [
              { label: '绿色', value: '#00B050' },
              { label: '白色', value: '#FFFFFF' },
              { label: '浅红', value: '#FF99CC' },
              { label: '红色', value: '#FF0000' },
              { label: '深红', value: '#C00000' }
          ],
          milepostList: [],
          colorDataList: []
      })
      const useTabName = ref('CEMENT_INGREDIENTS')
      import { watchEffect } from 'vue'
      const { tabName } = props
      // watchEffect(() => {
      //     if (props.tabName) {
      //         useTabName.value = props.tabName
      //         getData()
      //     }
      // })
      watch(
          () => props.tabName,
          val => {
              if (val) {
                  useTabName.value = val
                  getData()
              }
          },
          { immediate: true }
      ) // 页面首次加载也触发

      const batchItem = {
          name: '',
          productLine: useTabName.value
      }
      const priorityItem = {
          name: undefined,
          productLine: useTabName.value
      }

      const timeAxisItem = {
          name: undefined,
          date: undefined,
          productLine: useTabName.value
      }
      const yearTimeItem = {
          name: undefined,
          date: undefined,
          productLine: useTabName.value
      }
      const showProjectItem = {
          projectId: undefined,
          projectSort: undefined
      }
      const columns = [
          {
              title: '区域',
              dataIndex: 'areaName',
              align: 'center'
          },
          {
              title: '项目',
              dataIndex: 'projectName',
              align: 'center'
          },

          {
              title: '批次',
              dataIndex: 'batchId',
              align: 'center'
          }
          // {
          //     title: '优先级',
          //     dataIndex: 'priorityId',
          //     align: 'center'
          // }
      ]
      function getData() {
          if (state.innerMilpostRadio === '项目') {
              get('/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/project_list').then(data => {
                  if (data.code !== 200) {
                      message.error(data.message)
                      return
                  }
                  state.projectList = data.data
                  getSelectData()
              })
          } else if (state.innerMilpostRadio === '里程碑项目阶段周期') {
              getEndToEnd()
          } else if (state.innerMilpostRadio === '延期偏差颜色设置') {
              getEndToEndColor()
          } else {
              get(
                  `/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/batch_priority_time/里程碑进度表/${state.innerMilpostRadio}`
              ).then(data => {
                  if (state.innerMilpostRadio === '批次') {
                      state.batchList = data.data
                  } else if (state.innerMilpostRadio === '优先级') {
                      state.priorityList = data.data
                  } else if (state.innerMilpostRadio === '时间轴') {
                      state.timeAxisList = data.data
                  }
              })
          }
      }
      function getSelectData() {
          get(
              `/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/batch_priority_time/里程碑进度表/批次
          `
          ).then(data => {
              if (data.code !== 200) {
                  message.error(data.message)
                  return
              }
              state.batchIdList = data.data.map(item => {
                  return {
                      label: item.name,
                      value: item.id
                  }
              })
          })
          get(
              `/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/batch_priority_time/里程碑进度表/优先级
          `
          ).then(data => {
              if (data.code !== 200) {
                  message.error(data.message)
                  return
              }
              state.priorityIdList = data.data.map(item => {
                  return {
                      label: item.name,
                      value: item.id
                  }
              })
          })
      }
      function getEndToEnd() {
          post('/solution-ppm/api/v2/built-in-system-ppm/project_progress_stage_config/search', {
              'orderBy': 'id',
              'conditions': [
                  {
                      'field': 'product_line',
                      'value': useTabName.value,
                      'operator': 'EQ',
                      'valueType': 'STRING'
                  }
              ]
          }).then(data => {
              state.milepostList = data.data
          })
      }
      function getEndToEndColor() {
          post(' /solution-ppm/api/v2/built-in-system-ppm/project_progress_delay_config/search', {
              'orderBy': 'id',
              'conditions': [
                  {
                      'field': 'product_line',
                      'value': useTabName.value,
                      'operator': 'EQ',
                      'valueType': 'STRING'
                  }
              ]
          }).then(data => {
              state.colorDataList = data.data
          })
      }
      //删除一个模块
      function handlerDeleteFormItem1(index) {
          state.batchList.splice(index, 1)
      }
      // 新插一条模块
      function handlerAddFormItem1(index, type) {
          if (type === '最后') {
              state.batchList.push({ ...batchItem })
          } else {
              // 否则使用 splice 方法在 index 后插入
              state.batchList.splice(index + 1, 0, { ...batchItem })
          }
      }
      function handlerDeleteFormItem2(index) {
          state.priorityList.splice(index, 1)
      }
      // 新插一条模块
      function handlerAddFormItem2(index, type) {
          if (type === '最后') {
              state.priorityList.push({ ...priorityItem })
          } else {
              // 否则使用 splice 方法在 index 后插入
              state.priorityList.splice(index + 1, 0, { ...batchItem })
          }
      }
      function handlerDeleteFormItem3(index) {
          state.timeAxisList.splice(index, 1)
      }
      // 新插一条模块
      function handlerAddFormItem3(index, type) {
          if (type === '最后') {
              state.timeAxisList.push({ ...timeAxisItem })
          } else {
              // 否则使用 splice 方法在 index 后插入
              state.timeAxisList.splice(index + 1, 0, { ...batchItem })
          }
      }
      const batchForm = ref(null)
      const priorityForm = ref(null)
      const timeAxiosForm = ref(null)
      function submit() {
          if (state.innerMilpostRadio === '批次') {
              batchForm.value.validate().then(() => {
                  post(
                      `/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/batch_priority_time/里程碑进度表/${state.innerMilpostRadio}
                    `,
                      state.batchList
                  )
                      .then(data => {
                          if (data.code !== 200) {
                              message.error(data.message)
                              return
                          }
                          message.success(data.message)
                      })
                      .finally(() => {
                          getData()
                      })
              })
          } else if (state.innerMilpostRadio === '优先级') {
              priorityForm.value.validate().then(() => {
                  post(
                      `/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/batch_priority_time/里程碑进度表/${state.innerMilpostRadio}
                    `,
                      state.priorityList
                  )
                      .then(data => {
                          if (data.code !== 200) {
                              message.error(data.message)
                              return
                          }
                          message.success(data.message)
                      })
                      .finally(() => {
                          getData()
                      })
              })
          } else if (state.innerMilpostRadio === '时间轴') {
              timeAxiosForm.value.validate().then(() => {
                  post(
                      `/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/batch_priority_time/里程碑进度表/${state.innerMilpostRadio}
                    `,
                      state.timeAxisList
                  )
                      .then(data => {
                          if (data.code !== 200) {
                              message.error(data.message)
                              return
                          }
                          message.success(data.message)
                      })
                      .finally(() => {
                          getData()
                      })
              })
          }
      }
      const milepostRef = ref(null)
      function submitMile() {
          milepostRef.value.validate().then(() => {
              put(
                  '/solution-ppm/api/v2/built-in-system-ppm/project_progress_stage_config/batch_modify',
                  state.milepostList
              ).then(data => {
                  if (data.code !== 200) {
                      message.error(data.message)
                      return
                  }
                  message.success(data.message)
                  getEndToEnd()
              })
          })
      }
      const colorRef = ref(null)
      function submitColor() {
          colorRef.value.validate().then(() => {
              put('/solution-ppm/api/v2/built-in-system-ppm/project_progress_delay_config/batch_modify ', {
                  'productLine': useTabName.value,
                  projectProgressDelayConfigList: state.colorDataList
              }).then(data => {
                  if (data.code !== 200) {
                      message.error(data.message)
                      return
                  }
                  message.success(data.message)
                  getEndToEnd()
              })
          })
      }
      function submitBatch(record) {
          put('/solution-ppm/api/v2/built-in-system-ppm/dashboard_config/project_config', record).then(data => {
              if (data.code !== 200) {
                  message.error(data.message)
                  return
              }
              message.success(data.message)
              getData()
          })
      }
      // 项目阶段颜色部分
      const mileItem = {
          stageName: undefined,
          stageNo: undefined,
          stagePeriod: undefined
      }
      const colorItem = {
          stageName: undefined,
          stageNo: undefined,
          stagePeriod: undefined
      }
      function handlerAddMile(index, type) {
          if (type === '最后') {
              state.milepostList.push({ ...mileItem, productLine: useTabName.value })
          } else {
              // 否则使用 splice 方法在 index 后插入
              state.milepostList.splice(index + 1, 0, {
                  ...mileItem,
                  productLine: useTabName.value
              })
          }
      }

      function handlerDeleteMile(index) {
          state.milepostList.splice(index, 1)
      }
      function handlerAddColor(index, type) {
          if (type === '最后') {
              state.colorDataList.push({ ...colorItem, productLine: useTabName.value })
          } else {
              // 否则使用 splice 方法在 index 后插入
              state.colorDataList.splice(index + 1, 0, {
                  ...colorItem,
                  productLine: state.radioType === useTabName.value
              })
          }
      }

      function handlerDeleteColor(index) {
          state.colorDataList.splice(index, 1)
      }
</script>
<style lang="less" scoped>
  .page_root {
  width: 100%;
  height: 100%;
  overflow: auto;
  }
  .page_root :deep(.@{ant-prefix}-spin-nested-loading),
  .page_root :deep(.@{ant-prefix}-spin-container)
   {
      height: 100%;
  }
  .page_root :deep(.@{ant-prefix}-spin-container .@{ant-prefix}-table-wrapper)
   {
      display: flex;
      flex-flow: column nowrap;
      justify-content: flex-start;
  }
  .page_root :deep(.@{ant-prefix}-table)
   {
    flex: auto;
    overflow: auto;
  }
  .table-moreBtn_down {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100px;
  }

  .table-moreBtn_menu :deep(.table-moreBtn_menu-item):hover {
    background: #ebf1ff;
  }

  /*  表格树结构样式处理，展开按钮层级增加*/
  :deep(.@{ant-prefix}-table-row-expand-icon) {
    z-index: 1;
  }
  /*  表格树结构 由于每个表格项采用自定义组件，使用绝对定位布局，开启树结构导致显示异常，暂时使用层级定位位置 */
  :deep(.@{ant-prefix}-table-row-level-1 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 15px !important;
    width: calc(100% - 15px);
  }
  :deep(.@{ant-prefix}-table-row-level-2 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 30px !important;
    width: calc(100% - 30px);
  }
  :deep(.@{ant-prefix}-table-row-level-3 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 45px !important;
    width: calc(100% - 45px);
  }
  :deep(.@{ant-prefix}-table-row-level-4 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 60px !important;
    width: calc(100% - 60px);
  }

  /* 穿梭框改变默认样式，为根据组件样式控制左右栏宽度。 */
  :deep(.@{ant-prefix}-transfer-list)
   {
      height: 100%;
      width: 50%;
  }


   .inner-div {
          background-color: #fff;
          height: 100%;
      }
      .inner-div :deep(.ant3-tabs-tab) {
          margin-left: 10px;
      }
      .inner-div :deep(.ant3-tabs-tab-btn) {
          text-align: center;
          //width: 68px;
          height: 32px;
          padding: 0 5px;
          line-height: 32px;
      }
      .inner-div :deep(.ant3-tabs-tab-active) {
          //width: 68px;
          height: 32px;
          background: #f0f2f5;
          border-radius: 16px;
          color: #262626;
          line-height: 32px;
          top: 12px;
      }
      .inner-div :deep(.ant3-tabs-ink-bar) {
          display: none !important;
      }
      .inner-div :deep(.ant3-tabs-tab.ant3-tabs-tab-active .ant3-tabs-tab-btn) {
          color: #262626;
          font-weight: 700;
          background: #f0f2f5;
          border-radius: 16px;
      }
      .form-content {
          display: inline-block;
          width: calc(100% - 80px);
      }
      .del {
          width: 28px;
          color: #3875ff;
          position: absolute;
          right: 35px;
          top: 5px;
      }
      .module-item {
          width: 80%;
          position: relative;
      }
      .add-btn {
          position: absolute;
          right: -35px;
          color: #3875ff;
          top: 5px;
      }
      .default-table:deep(.@{ant-prefix}-table-thead) > tr > th {
          background-color: #3875ff;
          color: #fff;
          font-weight: 600;
          padding: 8px 16px;
          border-right: 1px solid #d9d9d9;
      }

      .default-table:deep(.@{ant-prefix}-table-tbody) tr > td {
          font-size: 14px;
          font-family: arial, helvetica, 'microsoft yahei';
          font-weight: 400;
          color: #262626;
          padding: 8px 8px;
          border-bottom: 1px solid #d9d9d9;
          word-break: break-all;
      }
</style>